import request from '@/utils/request'

// 字典分类
export function listDicType(params) {
  return request({
    url: '/dicType/list',
    method: 'get',
    params
  })
}

export function saveDicType(data) {
  return request({
    url: `/dicType/add`,
    method: 'post',
    data
  })
}

export function updateDicType(data) {
  return request({
    url: `/dicType/update`,
    method: 'post',
    data
  })
}

export function delDicType(id) {
  return request({
    url: `/dicType/delete`,
    method: 'delete',
    params: { id: id }
  })
}


// 字典
export function listPage(params) {
  return request({
    url: '/dic/listPage',
    method: 'get',
    params
  })
}

export function saveDict(data) {
  return request({
    url: `/dic/add`,
    method: 'post',
    data
  })
}

export function updateDict(data) {
  return request({
    url: `/dic/update`,
    method: 'post',
    data
  })
}

export function delDict(id) {
  return request({
    url: `/dic/delete`,
    method: 'delete',
    params: { id: id }
  })
}
